package com.be.beadmin.product.entity;

import com.be.beadmin.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Description: 单柜工序生产信息
 * @author: Jiaming Zheng
 * @Date: Create in 15:48 2023/3/19
 * @Modified By:
 **/

@Entity
@Table(name="T_OM_ProductManufactInforExecute")
@Getter
@Setter
public class ProductManufactInforExecute extends BaseEntity {

    @Column(name = "BatchProductId",columnDefinition = "VARCHAR(50) COMMENT '柜体ID' null")
    private String batchProductId;

    @Column(name = "WorkOrderInforId",columnDefinition = "VARCHAR(50) COMMENT '工单ID'")
    private String workOrderInforId;
    @Column(name = "WorkOrderInforCode",columnDefinition = "VARCHAR(50) COMMENT '工单code'")
    private String workOrderInforCode;

    @Column(name = "ProcessId",columnDefinition = "VARCHAR(50) COMMENT '工序ID'")
    private String processId;

    @Column(name = "ProcessName",columnDefinition = "VARCHAR(50) COMMENT '工序名称'")
    private String processName;

    @Column(name = "ProcessCode",columnDefinition = "VARCHAR(50) COMMENT '工序编码'")
    private String processCode;

    @Column(name = "StandManufactWorkhour",columnDefinition = "Float COMMENT '加工工序标准生产工时'")
    private Float standManufactWorkhour ;

    @Column(name = "ManufactWorkhour",columnDefinition = "Float COMMENT '加工工序实际生产工时'")
    private Float ManufactWorkhour ;

    @Column(name = "PlanManufactStartDate",columnDefinition = "datetime COMMENT '工序计划开始时间' ")
    private Date planManufactStartDate;

    @Column(name = "PlanManufactEndDate",columnDefinition = "datetime COMMENT '工序计划完成时间' ")
    private Date planManufactEndDate;

    @Column(name = "ManufactStartDate",columnDefinition = "datetime COMMENT '工序实际开始时间' ")
    private Date manufactStartDate;

    @Column(name = "ManufactEndDate",columnDefinition = "datetime COMMENT '工序实际完成时间' ")
    private Date manufactEndDate;

    @Column(name = "Sequence",columnDefinition = "int COMMENT '工序序列'  not null")
    private int sequence;

    /**
     * 0未开始
     * 1执行中
     * 2暂停
     * 3完成
     */
    @Column(
            name = "ProcessStatus",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '当前工序执行状态' "
    )
    protected Integer processStatus = 0;

    /**
     * 0无异常
     * 1有异常
     */
    @Column(
            name = "ProcessErrorFlag",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '当前工序执行异常标识' "
    )
    protected Integer processErrorFlag = 0;

    @Column(name = "Memo", columnDefinition = "VARCHAR(50) COMMENT '备注' ")
    private String memo;

}
